package com.example.test.启动线程.生成消费lock;

public class Pro implements Runnable {

    private Data data;

    public Pro(Data data) {
        this.data = data;
    }

    @Override
    public void run() {

        int i = 0;
        while (true) {
            data.setMessage("嘿嘿嘿" + i++);
        }
    }
}
